package com.sc.nft.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sc.nft.enums.*;
import com.sc.nft.sup.SuperEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 结算单
 * </p>
 *
 * @author PC
 * @since 2024-10-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sc_order_settle")
public class OrderSettle extends SuperEntity<OrderSettle> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 订单id
     */
    @TableField("order_id")
    private Long orderId;

    /**
     * 支付单id-快照字段方便分账
     */
    @TableField("pay_order_id")
    private Long payOrderId;

    /**
     * 结算单单号
     */
    @TableField("settle_no")
    private String settleNo;

    /**
     * 二级订单号
     */
    @TableField("order_no")
    private String orderNo;

    /**
     * 业务类型 1-藏品 2-道具
     * @see BizTypeEnum
     */
    @TableField("biz_type")
    private BizTypeEnum bizType;

    /**
     * 业务类型 1-藏品 2-道具
     * @see BizTypeEnum
     */
    @TableField("market_level")
    private MarketLevelEnum marketLevel;

    /**
     * 字符单号-快照字段方便分账
     */
    @TableField("pay_no")
    private String payNo;

    /**
     * 结算金额
     */
    @TableField("settle_amount")
    private BigDecimal settleAmount;

    /**
     * 支付渠道
     * @see PayChannelEnum
     */
    @TableField("pay_channel")
    private PayChannelEnum payChannel;


    /**
     * 支付方法
     * @see PayMethodEnum
     */
    @TableField("pay_method")
    private PayMethodEnum payMethod;

    /**
     * 0-待结算 1-已结算 2-已取消
     */
    @TableField("status")
    private SettleAccountStatusEnum status;

    /**
     * 钱包记录类型
     */
    @TableField("type")
    private WalletDetailTypeEnum type;

    /**
     * 账单记录类型
     */
    @TableField("expenditure_record_type")
    private ExpenditureRecordTypeEnum expenditureRecordType;

    /**
     * 用户类型 MERCHANT/USER
     */
    @TableField("user_type")
    private SettleUserTypeEnum userType;

    /**
     * 订单总金额
     */
    @TableField("order_amount")
    private BigDecimal orderAmount;

    /**
     * 分账超时时间-杉德支付超时后无法分账需要代付
     */
    @TableField("expire_time")
    private Date expireTime;






}
